package com.credithc.customers.manager.schedule;

import org.quartz.Job;
import org.quartz.JobDataMap;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;

/**
 * @author zhukai
 * @date 19/2/14 0014 11:42
 */

public class TestJob1 implements Job {

    @Override
    public void execute(JobExecutionContext context) throws JobExecutionException {
        System.out.println("=============================TestJob1==============================");
        JobDataMap jobDataMap = context.getJobDetail().getJobDataMap();
        if(jobDataMap.size() > 0){
            String type = jobDataMap.getString("type");
            if(type.equals("haha")){
                System.out.println("=============================TestJob1--haha==============================");
            }else if (type.equals("hehe")){
                System.out.println("=============================TestJob1--hehe==============================");
            }
        }
    }
}
